From 0b0e2f53e9c560a4450cab22b7009a5ac5037307 Mon Sep 17 00:00:00 2001 From: "mjw@wray-m-3.hpl.hp.com" Date: Mon, 28 Jun 2004 15:17:00 +0000 Subject: [PATCH] bitkeeper revision 1.1010.1.13 (40e0366cZLFe2i7OeoPJ8sckG6xSpg) Yet more rename fixes. --- tools/examples/xmdefaults | 3 --- tools/xen/lib/xend/XendDomain.py | 7 +++---- tools/xen/lib/xend/XendDomainInfo.py | 6 +++--- tools/xen/lib/xm/opts.py | 1 + tools/xen/lib/xm/shutdown.py | 2 +- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/tools/examples/xmdefaults b/tools/examples/xmdefaults index 311f38e2d0..efa56bdc20 100644 --- a/tools/examples/xmdefaults +++ b/tools/examples/xmdefaults @@ -5,9 +5,6 @@ # This file expects the variable 'vmid' to be set. #============================================================================ -import sys -import xenctl.ip - try: vmid = int(vmid) # convert to integer except: diff --git a/tools/xen/lib/xend/XendDomain.py b/tools/xen/lib/xend/XendDomain.py index d1e79a2b7d..3aaf080c36 100644 --- a/tools/xen/lib/xend/XendDomain.py +++ b/tools/xen/lib/xend/XendDomain.py @@ -9,7 +9,6 @@ import sys from twisted.internet import defer import xen.ext.xc; xc = xen.ext.xc.new() -import xenctl.ip import sxp import XendRoot @@ -336,9 +335,9 @@ class XendDomain: if not dominfo: return None return dominfo.get_device_by_index(vif) - def domain_vif_ip_add(self, dom, vif, ip): - dom = int(dom) - return xenctl.ip.setup_vfr_rules_for_vif(dom, vif, ip) +## def domain_vif_ip_add(self, dom, vif, ip): +## dom = int(dom) +## return xenctl.ip.setup_vfr_rules_for_vif(dom, vif, ip) def domain_vbd_ls(self, dom): dominfo = self.domain_get(dom) diff --git a/tools/xen/lib/xend/XendDomainInfo.py b/tools/xen/lib/xend/XendDomainInfo.py index 05c7ba26b2..c17109c85a 100644 --- a/tools/xen/lib/xend/XendDomainInfo.py +++ b/tools/xen/lib/xend/XendDomainInfo.py @@ -17,7 +17,7 @@ import os from twisted.internet import defer import xen.ext.xc; xc = xen.ext.xc.new() -import xenctl.ip +import xen.util.ip import sxp @@ -167,14 +167,14 @@ def vif_up(iplist): print >> open(IP_NONLOCAL_BIND, 'w'), str(v) def link_local(ip): - return xenctl.ip.check_subnet(ip, '169.254.0.0', '255.255.0.0') + return xen.util.ip.check_subnet(ip, '169.254.0.0', '255.255.0.0') def arping(ip, gw): cmd = '/usr/sbin/arping -A -b -I eth0 -c 1 -s %s %s' % (ip, gw) print cmd os.system(cmd) - gateway = xenctl.ip.get_current_ipgw() or '255.255.255.255' + gateway = xen.util.ip.get_current_ipgw() or '255.255.255.255' nlb = get_ip_nonlocal_bind() if not nlb: set_ip_nonlocal_bind(1) try: diff --git a/tools/xen/lib/xm/opts.py b/tools/xen/lib/xm/opts.py index 5b9515215d..eb07936f1e 100644 --- a/tools/xen/lib/xm/opts.py +++ b/tools/xen/lib/xm/opts.py @@ -290,6 +290,7 @@ class Opts: cmd = '\n'.join(["import sys", "import os", "import os.path", + "import xen.util.ip", "xm_file = '%s'" % defaults, "xm_help = %d" % help ]) exec cmd in globals, locals diff --git a/tools/xen/lib/xm/shutdown.py b/tools/xen/lib/xm/shutdown.py index 7dc81008f1..aaa354554a 100644 --- a/tools/xen/lib/xm/shutdown.py +++ b/tools/xen/lib/xm/shutdown.py @@ -6,7 +6,7 @@ import sys import time from xen.xend.XendClient import server -from xen.xend.xm.opts import * +from xen.xm.opts import * gopts = Opts(use="""[options] [DOM] -- 2.30.2